import request from '../utils/request'

//发送验证码
export const getCode = (data) => {
  return request.post('https://v3pz.itndedu.com/v3pz/get/code', data)
}

//注册用户
export const userAuthentication = (data) => {
  return request.post('https://v3pz.itndedu.com/v3pz/user/authentication', data)
}

//登录
export const login = (data) => {
  return request.post('https://v3pz.itndedu.com/v3pz/login', data)
}

//权限管理列表
export const authAdmin = (pageNum, pageSize) => {
  return request.get('https://v3pz.itndedu.com/v3pz/auth/admin', {
    params: {
      pageNum,
      pageSize
    }
  })
}

//菜单权限数据
export const userGetMenu = () => {
  return request.get('https://v3pz.itndedu.com/v3pz/user/getmenu')
}

//菜单权限修改
export const userSetMenu = (data) => {
  return request.post('https://v3pz.itndedu.com/v3pz/user/setmenu', data)
}

//菜单权限列表
export const menuList = (params) => {
  return request.get('https://v3pz.itndedu.com/v3pz/menu/list', { params })
}

//权限下拉列表
export const menuSelectList = () => {
  return request.get('https://v3pz.itndedu.com/v3pz/menu/selectlist')
}

//用户数据修改
export const updateUser = (data) => {
  return request.post('https://v3pz.itndedu.com/v3pz/update/user', data)
}

//用户菜单权限
export const menuPermissions = () => {
  return request.get('https://v3pz.itndedu.com/v3pz/menu/permissions')
}

//陪护师头像列表
export const photoList = () => {
  return request.get('https://v3pz.itndedu.com/v3pz/photo/list')
}

//陪护师创建
export const companion = (data) => {
  return request.post('https://v3pz.itndedu.com/v3pz/companion', data)
}

//陪护列表
export const companionList = (params) => {
  return request.get('https://v3pz.itndedu.com/v3pz/companion/list', { params })
}

//陪护师傅删除
export const deleteCompanion = (data) => {
  return request.post('https://v3pz.itndedu.com/v3pz/delete/companion', data)
}

//订单列表
export const adminOrder = (params) => {
  return request.get('https://v3pz.itndedu.com/v3pz/admin/order', { params })
}

//服务状态完成
export const updateOrder = (data) => {
  return request.post('https://v3pz.itndedu.com/v3pz/update/order', data)
}

export const indexInfo = () => {
  return request.get('https://v3pz.itndedu.com/v3pz/report')
}
